package groovy文件操作

class 获取文件的大小 {

    static void main(String[] args) {
        File file = new File("D:\\C3D\\Files\\3.txt");
        println "The file ${file.absolutePath} has ${file.length()} bytes"
    }

}
